/*******************************************************************************
 * Copyright 2013 Mindaugas Idzelis
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 ******************************************************************************/
package incontrol.bf3.protocol.events.datatype;

public enum GameMode {
	// @formatter:off
	CONQUEST64("ConquestLarge0"),
	CONQUEST("ConquestSmall0"),
	RUSH("RushLarge"),
	SQUADRUSH("SquadRush0"),
	SQUADDEATHMATH("SquadDeathMatch0"),
	TEAMDEATHMATCH("TeamDeathMatch0"),
	
	CONQUESTASSAULT64("ConquestAssaultLarge0"),
	CONQUESTASSAULT("ConquestAssaultSmall0"),
	CONQUESTASSAULTALT("ConquestAssaultSmall1"),
	
	TEAMDEATHMATCHCLOSEQUARTERS("TeamDeathMatchC0"),
	DOMINATION("Domination0"),
	GUNMASTER("GunMaster0");
	// @formatter:on
	private String id;

	private GameMode(String id) {
		this.id = id;
	}

	public static GameMode lookup(String id) {
		for (GameMode mode : GameMode.values()) {
			if (mode.id.equals(id))
				return mode;
		}
		return null;
	}
}
